#include "Log.hpp"
#include "ThreadPool.hpp"
#include "Task.hpp"

using namespace LogModule;
using namespace ThreadPoolModule;
int main()
{
    Enable_Console_Log_Strategy();

    // ThreadPool<task_t> *tp = new ThreadPool<task_t>();

    // tp->Start();
    int count = 10;
    while(count--)
    {
        ThreadPool<task_t>::GetIntance()->Enqueue(Download);
        sleep(1);
    }
    ThreadPool<task_t>::GetIntance()->Stop();
    ThreadPool<task_t>::GetIntance()->Join();
    // tp->Stop();
    // tp->Join();

    // LogModule::ConsoleLogStrategy consoleLog;
    // LogModule::FileLogStrategy fileLog;
    // consoleLog.SyncLog("This is a console log");
    // fileLog.SyncLog("This is a file log");
    // log.EnableFileLogStrategy();
    // log(LogLevel::DEBUG, "main.cpp", 10) << "hello world " << 3.14 << 8899 << "aaaa";
    // log(LogLevel::DEBUG, "main.cpp", 10) << "hello world";
    // log(LogLevel::DEBUG, "main.cpp", 10) << "hello world";
    // log(LogLevel::DEBUG, "main.cpp", 10) << "hello world";
    // log(LogLevel::DEBUG, "main.cpp", 10) << "hello world";
    // log(LogLevel::DEBUG, "main.cpp", 10) << "hello world";
    return 0;
}